package com.ygou.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.ygou.pojo.Cart;
import com.ygou.pojo.CountInfo;
import com.ygou.pojo.Orders;
import com.ygou.pojo.OrdersExample;

public interface OrdersService {
	List<Orders> selectByExample(String orderNo,String createTime,Integer ispay,Integer isrefund);
    Orders selectByPrimaryKey(Integer orderid);
    boolean updateByPrimaryKey(Orders record);
    Double findSum(String where);
    int countByExample(Integer isrefund);
    /**
     * 购物车添加订单
     * @param order
     * @param cartids
     * @return
     */
    int addOrder(Orders order,List<Integer> cartids,Integer goodsid,Integer skuattr);
    
    /**
     * 结算订单
     * @param orderid
     * @param userid
     * @return
     */
    boolean balance(Integer orderid,Integer userid);
    /**
     *获取该用户下的所有订单信息
     * @param userid
     * @return
     */
    List<Orders> getOrdersQ(Integer userid);
    /**
     * 删除订单
     * @param orderid
     * @return
     */
    boolean delOrder(Integer orderid);
    
    Map<String, Object> count(Map<String,Object> map);

}
